﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Manageweb_Coffee_ViewBuyCoffeeRecords : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!Page.IsPostBack)
        {
            BindBuyRecords();
        }
    }

    protected void BindBuyRecords()
    {
        SQLExpressDAL.CoffeeTableAdapters.RecordTableAdapter adp = new SQLExpressDAL.CoffeeTableAdapters.RecordTableAdapter();
       this.GV_CoffeeList.DataSource=adp.GetBuyCoffeeRecord(Session["UserID"].ToString());
       this.GV_CoffeeList.DataBind();
      
    }
    protected void GV_CoffeeList_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        this.GV_CoffeeList.PageIndex = e.NewPageIndex;
        BindBuyRecords();
    }
}
